package com.weipai.demo.controller;

import com.weipai.demo.model.HelpCenter;
import com.weipai.demo.service.HelpCenterService;
import com.weipai.demo.util.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 赵项阳
 * @Date: 2019/7/6 11:51
 * @Version 1.0
 */
@RestController
public class HelpCenterController {

    @Autowired
    private HelpCenterService helpCenterService;

    //填写或修改帮助中心
    @RequestMapping(value = "/help/save")
    public Response save(HelpCenter helpCenter){
        return helpCenterService.save(helpCenter);
    }
    //展示帮助中心
    @RequestMapping(value = "/help/show")
    public Response show(){
        return helpCenterService.show();
    }

    //删除帮助中心
    @RequestMapping(value = "/help/deleteById")
    public Response deleteById(Integer id){
        return helpCenterService.deleteById(id);
    }

}
